package com.wjc.train.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author Guessed
 * 短信记录实体
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sms_record")
public class SmsRecord {

    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private Long id;

    @TableField(value = "mobile")
    private String mobile;

    //验证码
    @TableField(value = "code")
    private String code;

    //有效期
    @TableField(value = "expire_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;

    //发送时间
    @TableField(value = "send_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;

    //发送时间
    @TableField(value = "use_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date useTime;

    //业务类型
    @TableField(value = "biz_type")
    private String bizType;


    //业务类型
    @TableField(value = "is_deleted")
    private Integer isDeleted;
}
